# $Id: PKGBUILD 66134 2012-02-23 01:41:23Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Douglas Soares de Andrade <dsandrade@gmail.com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=python2-pychart
pkgver=1.39
pkgrel=7
url="http://home.gna.org/pychart/"
arch=('any')
pkgdesc="Python library for creating Encapsulated Postscript, PDF, PNG, or SVG charts."
depends=('python2')
license=('GPL')
source=(http://download.gna.org/pychart/PyChart-$pkgver.tar.gz
	http://download.gna.org/pychart/pychart-doc.tar.gz)
md5sums=('f1f509a1c4623056c8e780bb7c9a05c5'
         '9309ac83d60c85e71dded649c6bca5f8')

build() {
  cd $srcdir/PyChart-$pkgver

  # python2 fix
  for file in pychart/theme.py ../pychart/command-line-options.html; do
      sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
  done

  python2 setup.py install --root=$pkgdir
  install -d $pkgdir/usr/share/doc/$pkgname
  cp $srcdir/pychart/* $pkgdir/usr/share/doc/$pkgname
}
